﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using DAL;
using Model;
namespace UI.system.page.ad
{
    public partial class adadd : BaseAdmin
    {
        public AdInfo info = new AdInfo();
        public NewsInfo news = new NewsInfo();
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = JobRequest.GetRequestInt("id");
            if (id != 0)
            {
                info = AdDAL.FindOneByID(id);
                if (info.NewsID > 0)
                {
                    news = NewsDAL.FindOneByID(info.NewsID);
                }
            }
            else
            {
                info.Position = 1;
                info.BeginDate = DateTime.Now;
                info.EndDate = DateTime.Now;
                info.Sort = CommonDAL.MaxSort("ad");
                info.Froms = 1;
            }
            
        }
    }
}